
// 获取左树的根节点

import proFetch from '../../../functions/project-fetch';



export default (data) => {

    let type = data.treeType || 'orgRange';

    if(type === 'orgRange') {
        return proFetch({
            url: '/nccloud/hrhi/psndoc/PsndocTreeRootAction.do',
            body: {
                pk_org: data.pk_org,
                node_type: data.node_type
            }
        });
    }
    else if(type === 'psnType') {
        return proFetch({
            url: '/nccloud/hrhi/psndoc/PsndocTreePsnclAction.do'
        });
    }
    else if(type === 'adminOrg') {
        return proFetch({
            url: '/nccloud/hrhi/psndoc/PsndocTreeAosRootAction.do',
            body: {
                node_type: data.node_type,
                pk_org: data.pk_org
            }
        });
    }
};
